#ifndef WIDGETDEF
#define WIDGETDEF

#include "SDL.h"
#include <string>
#include <list>
#include <string>
#include "boost/shared_ptr.hpp"
class widget{
protected:

	SDL_Rect m_area;
	widget* m_parent;
	std::list<boost::shared_ptr<widget>> m_children;
	std::string m_name;
	SDL_Surface* m_surface;
	bool m_dragable;
	bool m_isClicked;
	
public:

	
	virtual void Draw(){};
	virtual void Think(){};
	virtual void SetParent(widget*){};
	virtual widget* GetParent(){return this;};
	virtual std::list<boost::shared_ptr<widget>> GetChildren(){return m_children;};
	virtual void AddChild(widget*){};
	virtual void RemoveChild(widget*){};
	virtual SDL_Surface* GetSurface(){return m_surface;};
	virtual SDL_Rect GetRect(){return m_area;};
	virtual void SetRect(SDL_Rect){};
	virtual void SetDragable(bool){};
	virtual bool GetDragable(){return m_dragable;};
	virtual void SetClicked(bool){};
	virtual bool GetClicked(){return false;};
	virtual bool IsHovered(int x,int y){return false;};


};

#endif